package top.healthylife.pangwa.client;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Gaozexi on 2020/5/19 16:13
 * Step by Step  and Stand on,  You Are The Best Investment!
 */
@Configuration
@ConditionalOnClass(PangWaMarkerConfiguration.Marker.class)
public class PangWaClientAutoConfiguration extends WebMvcConfigurerAdapter {

    @Bean
    public Map<String,Object> createMap(){
        return new HashMap<>(16);
    }

    @Bean
    public MyRestTemplate getMyRestTemplate(){
        return new MyRestTemplate();
    }
}
